from django.http import HttpResponseRedirect
from django.shortcuts import render
from django.urls import reverse


# Create your views here.
def hello(request, age, name):
    name = name
    age = age
    return render(request, 'zxy/hello.html', locals())


def rev(request):
    return render(request, 'zxy/rev.html')


# reverse函数实现反向解析重定向到我们想要的有页面
def test_to_reverse(request):
    return HttpResponseRedirect(reverse('zxy:detail_hello'))
    # return HttpResponseRedirect(reverse(rev))

